﻿<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Users.aspx.cs"
    Inherits="Users" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
    <title>XmlProviders - Users</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <h2>
        Users</h2>
    <fieldset>
        <legend>New User</legend>
        <asp:CreateUserWizard runat="server" ActiveStepIndex="1">
            <StartNavigationTemplate>
                <asp:Button ID="StartNextButton" runat="server" CommandName="MoveNext" Text="Next" />
            </StartNavigationTemplate>
            <WizardSteps>
                <asp:CreateUserWizardStep runat="server">
                </asp:CreateUserWizardStep>
                <asp:CompleteWizardStep runat="server">
                    <ContentTemplate>
                        <table border="0">
                            <tr>
                                <td align="center">
                                    Complete</td>
                            </tr>
                            <tr>
                                <td>
                                    Your account has been successfully created.</td>
                            </tr>
                            <tr>
                                <td align="center">
                                    Select Roles
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:CheckBoxList ID="cblRoles" runat="server" OnLoad="HandleRolesListLoad">
                                    </asp:CheckBoxList>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Button ID="ContinueButton" runat="server" CausesValidation="False" 
                                        CommandName="Continue" Text="Continue" ValidationGroup="ctl00" />
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </asp:CompleteWizardStep>
            </WizardSteps>
        </asp:CreateUserWizard>
    </fieldset>
    <ul class="list">
        <asp:Repeater ID="rptUsers" runat="server">
            <AlternatingItemTemplate>
                <li class="alter">
                    <% if (this.User.Identity.IsAuthenticated) { %>
                    <span class="commands">
                        <asp:LinkButton runat="server" CommandName="Delete" CommandArgument='<%# Eval("UserName") %>'
                            OnCommand="HandleCommand">Delete</asp:LinkButton>
                    </span>
                    <% } %>
                    <%# Eval("UserName") %>
                </li>
            </AlternatingItemTemplate>
            <ItemTemplate>
                <li>
                    <% if (this.User.Identity.IsAuthenticated) { %>
                    <span class="commands">
                        <asp:LinkButton runat="server" CommandName="Delete" CommandArgument='<%# Eval("UserName") %>'
                            OnCommand="HandleCommand">Delete</asp:LinkButton>
                    </span>
                    <% } %>
                    <%# Eval("UserName")%>
                </li>
            </ItemTemplate>
        </asp:Repeater>
    </ul>
</asp:Content>
